import { mxnzpAPIInfo } from '../data/apiInfo';
// import axios from 'axios';

// const request = axios.create({ baseURL: '' })

// ts
export interface ImageData {
  imageUrl: string;
  imageSize: string;
  imageFileLength: number;
  [key: string]: unknown;
}

export interface ResponseData {
  code: number;
  msg: string;
  data: ImageData[];
}

function generateRequestUrl() {
  return `https://www.mxnzp.com/api/image/girl/list/random?app_id=${mxnzpAPIInfo.app_id}&app_secret=${mxnzpAPIInfo.app_secret}`;
}

export default async function (): Promise<ResponseData> {
  await Promise.resolve(true);
  generateRequestUrl();
  return {
    code: 1,
    msg: '数据返回成功！',
    data: [
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/31/mlckqdlkgvnmfxjn.jpg',
        imageSize: '1728x1080',
        imageFileLength: 223142,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/226/joh8wpockaeanmui.jpg',
        imageSize: '1728x1080',
        imageFileLength: 251992,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/299/9vbjpofgnxzqmhwz.jpg',
        imageSize: '1728x1080',
        imageFileLength: 119677,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/482/klgfrjminjlflvur.jpg',
        imageSize: '1728x1080',
        imageFileLength: 103002,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/557/tmysjytrxsbdhtth.jpg',
        imageSize: '1920x1080',
        imageFileLength: 199285,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/564/tiimfqmwhnfuyp9g.jpg',
        imageSize: '1728x1080',
        imageFileLength: 237105,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/566/itxhgitlvkrk3wmr.jpg',
        imageSize: '1920x1080',
        imageFileLength: 185982,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/744/8zhwqhgagikmxoac.jpg',
        imageSize: '1728x1080',
        imageFileLength: 156255,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/772/iqd9obqpkxrqekcy.jpg',
        imageSize: '1728x1080',
        imageFileLength: 244794,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/856/q8uvjprmicoevjut.jpg',
        imageSize: '1920x1080',
        imageFileLength: 158474,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/146/vktomqofsossicgh.jpg',
        imageSize: '1729x1080',
        imageFileLength: 411657,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/199/dksumlgbon9etrwe.jpg',
        imageSize: '1920x1080',
        imageFileLength: 125394,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/247/nqlnecismmpfdipu.jpg',
        imageSize: '1728x1080',
        imageFileLength: 136070,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/277/lkjriujnkhoekbkn.jpg',
        imageSize: '1920x1080',
        imageFileLength: 192585,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/342/phongmhhnmwkqv3o.jpg',
        imageSize: '1728x1080',
        imageFileLength: 248959,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/413/fggftonnjvhmnnnf.jpg',
        imageSize: '1728x1080',
        imageFileLength: 132932,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/646/jwmootfnkt1jqgj7.jpg',
        imageSize: '1728x1080',
        imageFileLength: 100629,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/714/bdygzumijvqkbowl.jpg',
        imageSize: '1728x1080',
        imageFileLength: 218060,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/760/rkrxselkidavquqn.jpg',
        imageSize: '1728x1080',
        imageFileLength: 126689,
      },
      {
        imageUrl:
          'http://power-api.cretinzp.com:8000/girls/937/ejtfddivks9mtcti.jpg',
        imageSize: '1728x1080',
        imageFileLength: 114572,
      },
    ],
  };
}
